//
//  MyContactVC.m
//  Yihubang
//
//  Created by hyu on 16/8/5.
//  Copyright © 2016年 jinghao. All rights reserved.
//

#import "MyContactVC.h"
#import "MyContactVCModel.h"
@interface MyContactVC ()
@property (nonatomic ,strong) MyContactVCModel * viewModel;
@end

@implementation MyContactVC

@synthesize viewModel = _viewModel;
@synthesize mTableView = _mTableView;
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title =@"紧急联系人";
    self.showLeftMenu =YES;
    [self.navigationController.navigationBar setHidden:NO];
    [self.viewModel bindTableView:self.mTableView];
    //去掉tableView多余的横线
    //    self.mTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    //    self.mTableView.separatorInset=UIEdgeInsetsMake(0,0, 0, 0);//top left bottom right
}

- (void)gotoBack {
    [self.navigationController.navigationBar setHidden:YES];
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.viewModel.changeSortCommend execute:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark -- getter and setter

- (MyContactVCModel *)viewModel{
    if (_viewModel==nil) {
        _viewModel = [[MyContactVCModel alloc] initWithViewController:self];
    }
    return _viewModel;
}



/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
